3.173 \(\int \frac{a+b \log (c x^n)}{x (d+e \log (f x^m))} \, dx\)

Optimal. Leaf size=71 \[ \frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-\frac{b n \left (d+e \log \left (f x^m\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e^2 m^2}+\frac{b n \log (x)}{e m} \]

[Out]

(b*n*Log[x])/(e*m) - (b*n*(d + e*Log[f*x^m])*Log[d + e*Log[f*x^m]])/(e^2*m^2) + ((a + b*Log[c*x^n])*Log[d + e*
Log[f*x^m]])/(e*m)

________________________________________________________________________________________

Rubi [A]  time = 0.106163, antiderivative size = 71, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 6, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {2302, 29, 2366, 12, 2389, 2295} \[ \frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-\frac{b n \left (d+e \log \left (f x^m\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e^2 m^2}+\frac{b n \log (x)}{e m} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])/(x*(d + e*Log[f*x^m])),x]

[Out]

(b*n*Log[x])/(e*m) - (b*n*(d + e*Log[f*x^m])*Log[d + e*Log[f*x^m]])/(e^2*m^2) + ((a + b*Log[c*x^n])*Log[d + e*
Log[f*x^m]])/(e*m)

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 2366

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.))*((g_.)*(x_))^(m_.), x_Sy
mbol] :> With[{u = IntHide[(g*x)^m*(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[Sim
plifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, x] &&  !(EqQ[p, 1] && EqQ[a, 0] &&
 NeQ[d, 0])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rubi steps

\begin{align*} \int \frac{a+b \log \left (c x^n\right )}{x \left (d+e \log \left (f x^m\right )\right )} \, dx &=\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-(b n) \int \frac{\log \left (d+e \log \left (f x^m\right )\right )}{e m x} \, dx\\ &=\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-\frac{(b n) \int \frac{\log \left (d+e \log \left (f x^m\right )\right )}{x} \, dx}{e m}\\ &=\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-\frac{(b n) \operatorname{Subst}\left (\int \log (d+e x) \, dx,x,\log \left (f x^m\right )\right )}{e m^2}\\ &=\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-\frac{(b n) \operatorname{Subst}\left (\int \log (x) \, dx,x,d+e \log \left (f x^m\right )\right )}{e^2 m^2}\\ &=\frac{b n \log (x)}{e m}-\frac{b n \left (d+e \log \left (f x^m\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e^2 m^2}+\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}\\ \end{align*}

Mathematica [A]  time = 0.0689173, size = 58, normalized size = 0.82 \[ \frac{\log \left (d+e \log \left (f x^m\right )\right ) \left (a e m+b e m \log \left (c x^n\right )-b d n-b e n \log \left (f x^m\right )\right )+b e m n \log (x)}{e^2 m^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])/(x*(d + e*Log[f*x^m])),x]

[Out]

(b*e*m*n*Log[x] + (a*e*m - b*d*n - b*e*n*Log[f*x^m] + b*e*m*Log[c*x^n])*Log[d + e*Log[f*x^m]])/(e^2*m^2)

________________________________________________________________________________________

Maple [C]  time = 0.152, size = 1744, normalized size = 24.6 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))/x/(d+e*ln(f*x^m)),x)

[Out]

-1/2*I/m*ln(e*Pi*csgn(I*f)*csgn(I*x^m)*csgn(I*f*x^m)-e*Pi*csgn(I*f)*csgn(I*f*x^m)^2-e*Pi*csgn(I*x^m)*csgn(I*f*
x^m)^2+e*Pi*csgn(I*f*x^m)^3+2*I*e*ln(f)+2*I*e*ln(x^m)+2*I*d)/e*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+1/2*I/
m*ln(e*Pi*csgn(I*f)*csgn(I*x^m)*csgn(I*f*x^m)-e*Pi*csgn(I*f)*csgn(I*f*x^m)^2-e*Pi*csgn(I*x^m)*csgn(I*f*x^m)^2+
e*Pi*csgn(I*f*x^m)^3+2*I*e*ln(f)+2*I*e*ln(x^m)+2*I*d)/e*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2+1/2*I/m*ln(e*Pi*csgn(I*
f)*csgn(I*x^m)*csgn(I*f*x^m)-e*Pi*csgn(I*f)*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n(I*f)*csgn(I*f*x^m)^2-e*Pi*csgn(I*x^m)*csgn(I*f*x^m)^2+e*Pi*csgn(I*f*x^m)^3+
2*I*ln(x)*e*m+2*I*e*ln(f)+2*I*e*(ln(x^m)-m*ln(x))+2*I*d)*n*ln(x^m)-b/e^2/m^2*ln(e*Pi*csgn(I*f)*csgn(I*x^m)*csg
n(I*f*x^m)-e*Pi*csgn(I*f)*csgn(I*f*x^m)^2-e*Pi*csgn(I*x^m)*csgn(I*f*x^m)^2+e*Pi*csgn(I*f*x^m)^3+2*I*ln(x)*e*m+
2*I*e*ln(f)+2*I*e*(ln(x^m)-m*ln(x))+2*I*d)*d*n

________________________________________________________________________________________

Maxima [A]  time = 1.24281, size = 159, normalized size = 2.24 \begin{align*} \frac{b \log \left (c x^{n}\right ) \log \left (\frac{e \log \left (f\right ) + e \log \left (x^{m}\right ) + d}{e}\right )}{e m} - \frac{b n{\left (\frac{{\left (e \log \left (f\right ) + e \log \left (x^{m}\right ) + d\right )} \log \left (\frac{e \log \left (f\right ) + e \log \left (x^{m}\right ) + d}{e}\right )}{e} - \frac{e \log \left (f\right ) + e \log \left (x^{m}\right ) + d}{e}\right )}}{e m^{2}} + \frac{a \log \left (\frac{e \log \left (f\right ) + e \log \left (x^{m}\right ) + d}{e}\right )}{e m} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(d+e*log(f*x^m)),x, algorithm="maxima")

[Out]

b*log(c*x^n)*log((e*log(f) + e*log(x^m) + d)/e)/(e*m) - b*n*((e*log(f) + e*log(x^m) + d)*log((e*log(f) + e*log
(x^m) + d)/e)/e - (e*log(f) + e*log(x^m) + d)/e)/(e*m^2) + a*log((e*log(f) + e*log(x^m) + d)/e)/(e*m)

________________________________________________________________________________________

Fricas [A]  time = 0.88048, size = 144, normalized size = 2.03 \begin{align*} \frac{b e m n \log \left (x\right ) +{\left (b e m \log \left (c\right ) - b e n \log \left (f\right ) + a e m - b d n\right )} \log \left (e m \log \left (x\right ) + e \log \left (f\right ) + d\right )}{e^{2} m^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(d+e*log(f*x^m)),x, algorithm="fricas")

[Out]

(b*e*m*n*log(x) + (b*e*m*log(c) - b*e*n*log(f) + a*e*m - b*d*n)*log(e*m*log(x) + e*log(f) + d))/(e^2*m^2)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{a + b \log{\left (c x^{n} \right )}}{x \left (d + e \log{\left (f x^{m} \right )}\right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))/x/(d+e*ln(f*x**m)),x)

[Out]

Integral((a + b*log(c*x**n))/(x*(d + e*log(f*x**m))), x)

________________________________________________________________________________________

Giac [A]  time = 1.28121, size = 115, normalized size = 1.62 \begin{align*} \frac{b n e^{\left (-1\right )} \log \left (x\right )}{m} + \frac{{\left (b m e \log \left (c\right ) - b n e \log \left (f\right ) - b d n + a m e\right )} e^{\left (-2\right )} \log \left (\frac{1}{4} \,{\left (\pi m{\left (\mathrm{sgn}\left (x\right ) - 1\right )} e + \pi{\left (\mathrm{sgn}\left (f\right ) - 1\right )} e\right )}^{2} +{\left (m e \log \left ({\left | x \right |}\right ) + e \log \left ({\left | f \right |}\right ) + d\right )}^{2}\right )}{2 \, m^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(d+e*log(f*x^m)),x, algorithm="giac")

[Out]

b*n*e^(-1)*log(x)/m + 1/2*(b*m*e*log(c) - b*n*e*log(f) - b*d*n + a*m*e)*e^(-2)*log(1/4*(pi*m*(sgn(x) - 1)*e +
pi*(sgn(f) - 1)*e)^2 + (m*e*log(abs(x)) + e*log(abs(f)) + d)^2)/m^2